function CustomInfoWindow(opts){
	//console.info('CustomInfoWindow');
	opts = opts || {};
	this.__position = opts.position;
	this.__content = opts.content;
	this.__map = opts.map || null;
}
//继承google.maps.OverlayView
CustomInfoWindow.prototype = new google.maps.OverlayView();
/**
 * 重写方法
 * 在 add() 方法中，您应当创建 DOM 对象，并将其作为窗格的子对象附加。
 */

CustomInfoWindow.prototype.onAdd = function(){
	//console.info('onAdd');
	this.panel = $('<div class="custom-info-window">'+
					'<div class="custom-info-window-bg"></div>'+
					'<div class="custom-info-window-container">'+
						this.__content +
					'</div>'+
				'</div>');
	var panes = this.getPanes();
	panes.floatPane.appendChild(this.panel[0]);
}
/**
 * 在 draw() 方法中，应放置这些元素。
 */
CustomInfoWindow.prototype.draw = function(){
	//console.info('draw');
	var point = this.getProjection().fromLatLngToDivPixel(this.__position);
	this.panel.css({
		left: point.x - 38,
		top: point.y - 94
	});
}
/**
 * 在 onRemove() 方法中，应将对象从 DOM 中删除。
 */
CustomInfoWindow.prototype.onRemove = function(){
	//console.info('onRemove');
	if (this.panel) {
		this.panel.remove();
		this.panel = null;
	}
}
CustomInfoWindow.prototype.open = function(){
	//console.info('open');
	if (!this.getMap() && this.__map){
		this.setMap(this.__map);
	}
}
CustomInfoWindow.prototype.close = function(){
	this.setMap(null);
}